package com.xoa.controller.task;


import com.xoa.service.task.TaskSubordinateService;
import com.xoa.service.task.TaskTypeService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *<p>
 *  下属任务
 *</p>
 *@author 王禹萌
 *@since  2019-12-21
 */
@Controller
@RequestMapping("/taskSubordinate")
public class TaskSubordinateController {

    @Autowired
    private TaskSubordinateService taskSubordinateService;

    /**
     * 查询下属
     * @param request
     * @param
     * @return
     */
    @ResponseBody
    @RequestMapping("/querySubordinate")
    public ToJson querySubordinate(HttpServletRequest request){

        return taskSubordinateService.querySubordinate(request);
    }

    /**
     * 查询关于下属任务（负责、参与、分享）与导出下属任务列表
     * @param request
     * @return
     */
    @ResponseBody
    @RequestMapping("/querySubordinateTask")
    public ToJson querySubordinateTask(HttpServletResponse response,HttpServletRequest request,String userId, Integer deptId,
                                       Integer pageSize, Integer page, Boolean useFlag, int temp){
        return taskSubordinateService.querySubordinateTask(response,request,userId,deptId,pageSize,page,useFlag,temp);
    }

    /**
     * 批量关注
     * @param request
     * @param taskId
     * @return
     */
    @ResponseBody
    @RequestMapping("/batchattentionTask")
    public ToJson batchattentionTask(HttpServletRequest request, String taskId){

        return taskSubordinateService.batchattentionTask(request,taskId);
    }


}


















